/**
 * A star
 */
package astar;

/**
 * @author DBJ(dubenju@126.com)
 */
public class Terrain {

    private int val;
    private int walkable;

    /**
     * 构造函数
     */
    public Terrain(int val) {
        this.val = val;
        if (this.val == 0) {
            this.walkable = AStarConstants.NOTE_UNWALKABLE;
        }
        if (this.val == 1) {
            this.walkable = AStarConstants.NOTE_WALKABLE;
        }
        if (this.val == 2) {
            this.walkable = AStarConstants.NOTE_UNWALKABLE;
        }
        if (this.val == 3) {
            this.walkable = AStarConstants.NOTE_UNWALKABLE;
        }
        if (this.val == 4) {
            this.walkable = AStarConstants.NOTE_WALKABLE;
        }
    }

    /**
     * @return val
     */
    public int getVal() {
        return val;
    }

    /**
     * @param val
     */
    public void setVal(int val) {
        this.val = val;
    }

    /**
     * @return walkable
     */
    public int getWalkable() {
        return walkable;
    }

    /**
     * @param walkable
     */
    public void setWalkable(int walkable) {
        this.walkable = walkable;
    }
}
